import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class poorvaroopa {
	public String splitDevanagari(String word, Map<String, String> dict){
		String a = null;
		for(int i = 0; i < word.length(); i++){
			if(word.substring(i, i+1).equals("ऽ")){
				String w1 = word.substring(0, i);
				String w2 = "अ" + word.substring(i+1);
				if(dict.containsKey(w1) && dict.containsKey(w2)){
					a = w1 + " " + w2;
					return a;
				}//end if
			}//end if
		}//end for
		return null;
	}//end method
	
	public String split(String word, Map<String, String> dict){
		String a = splitDevanagari(word, dict);
		if (a != null)
			return a;
		for(int i = 0; i < word.length(); i++){
			if(word.substring(i, i+1).equals("E")){
				String w1 = word.substring(0, i) + "e";
				String w2 = "a" + word.substring(i+1);
				if(dict.containsKey(w1) && dict.containsKey(w2)){
					a = w1 + " " + w2;
					return a;
				}//end if
			}//end if
			if(word.substring(i, i+1).equals("O")){
				String w1 = word.substring(0, i) + "o";
				String w2 = "a" + word.substring(i+1);
				if(dict.containsKey(w1) && dict.containsKey(w2)){
					a = w1 + " " + w2;
					return a;
				}//end if
			}//end if
		}//end for
		return "Word doesn't contain this sandhi.";
	}//end method
}//end class
